#!/usr/bin/env python3
# -*- coding: utf-8 -*-

b = bytes.fromhex

# This funky thing doesn't manage the EPI handles, only pulls base addr.

s_name =  "NGEE 1F130H~1F210H	007 Goldeneye (USA)"
sample = b("""27BDFFD8 AFBF001C AFA40028 AFA5002C AFA60030 AFA70034 AFB10018 AFB00014
              3C0EA460 8DD00010 320F0003 11E00006 00000000 3C18A460 8F100010 32190003
              1720FFFC 00000000 0C003A2C 8FA40034 3C08A460 AD020000 8FA90028 8FAB0030
              3C011FFF 8D2A000C 3421FFFF 3C0EA460 014B6025 01816824 ADCD0004 8FB1002C
              12200005 24010001 12210008 00000000 1000000B 00000000 8FAF0038 3C19A460
              25F8FFFF 10000008 AF38000C 8FA80038 3C0AA460 2509FFFF 10000003 AD490008
              10000002 2402FFFF 00001025 8FBF001C 8FB00014 8FB10018 03E00008 27BD0028""")

s_mask = b("""FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
              FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
              FFFFFFFF FFFFFFFF 00000000 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
              FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
              FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
              FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
              FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF""")

symbol = {'EDMA handler':0x6FFFF400,
          }

# TODO: the other part managing extended PI requests + read word function (GE only has write).
p_data = b("""27BDFFD8 AFBF001C AFA40028 AFA5002C AFA60030 AFA70034 AFB10018 AFB00014
              3C0EA460 8DD00010 320F0003 11E00006 00000000 3C18A460 8F100010 32190003
              1720FFFC 00000000 00000000 8FA40034 3C08A460 AD020000 8FA90028 8FAB0030
              3C011FFF 8D2A000C 3421FFFF 3C0EA460 014B6025 01816824 ADCD0004 8FB1002C
              2D820401 10400002 8FAF0038 25CE0050 24010001 25F8FFFF 5220000B ADD8000C
              52210009 ADD80008 10000008 2402FFFF 00000000 00000000 00000000 00000000
              00000000 00000000 00001025 8FBF001C 8FB00014 8FB10018 03E00008 27BD0028""")

p_cmds = ((0x48, 0x48, 4),
          )

